<%@page import="com.labot.types.MailType"%>
<%@ include file="/common/taglibs.jsp" %>

<head>
    <title><fmt:message key="checkmail.title"/></title>
    <meta name="menu" content="AdminMenu"/>
</head>
<body id="info">

<div>
    <h2><fmt:message key="checkmail.heading"/></h2>

    <p><fmt:message key="checkmail.message"/></p>

	<s:form name="checkMailForm" action="sendTestMail" method="post" validate="true" cssClass="well form-horizontal" autocomplete="off">
		<s:textfield name="mail" key="checkmail.mail" required="true"/>
		<div id="actions" class="form-actions">
            <s:submit type="button" cssClass="btn btn-primary" method="sendTestMail" key="button.send" theme="simple">
                <i class="icon-ok icon-white"></i>
                <fmt:message key="button.send"/>
            </s:submit>
            <div class="btn" onclick="window.history.back();">
                <i class="icon-remove"></i>
                <fmt:message key="button.cancel"/>
            </div>
        </div>
	</s:form>
 
    <s:form name="testMailForm" action="sendTestMailTemplate" method="post" validate="true" cssClass="well form-horizontal" autocomplete="off">
		<s:textfield name="mail" key="checkmail.mail" required="true"/>
		<fieldset class="control-group">
            <label for="name" class="control-label"><fmt:message key="template.name"/></label>
            <div class="controls" >
                <select id="mailType" name="mailType" style="width:92%">
                    <c:forEach items="<%= MailType.values() %>" var="name">
                   	 	<option value="${name}"><fmt:message key="template.${name}"/> (${ name })</option>
                    </c:forEach>
                </select>
            </div>
        </fieldset>
        
		<div id="actions" class="form-actions">
            <s:submit type="button" cssClass="btn btn-primary" method="sendTestMail" key="button.send" theme="simple">
                <i class="icon-ok icon-white"></i>
                <fmt:message key="button.send"/>
            </s:submit>
            <div class="btn" onclick="window.history.back();">
                <i class="icon-remove"></i>
                <fmt:message key="button.cancel"/>
            </div>
        </div>
	</s:form>
</div>
</body>